package inventory.service.impl;

import inventory.entity.MaterialTypical;
import inventory.entity.po.MaterialBrandAndModelPo;
import inventory.mappers.MaterialTypicalMapper;
import inventory.service.MaterialTypicalService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sxt
 * @since 2019-11-06
 */
@Service
public class MaterialTypicalServiceImpl extends ServiceImpl<MaterialTypicalMapper, MaterialTypical> implements MaterialTypicalService {

    @Resource
    private MaterialTypicalMapper typicalMapper;


    @Override
    public List<String> queryTypicalByCategoryId(String id, String managerId) {
        List<String> rs = typicalMapper.selectTypicalByCategoryId(id,managerId);
        return rs;
    }


    @Override
    public List<MaterialBrandAndModelPo> queryMaterialBrandAndModelPoByTypicalName(String name,String managerId,String categoryId) {
        List<MaterialBrandAndModelPo> materialBrandAndModelPos = typicalMapper.selectMaterialBrandAndModelPoByTypicalName(name,managerId,categoryId);
        return materialBrandAndModelPos;
    }
}
